package com.syni.mdd.yhd.common.all.controller.protect;

/**
 * @className BmsBusinessController
 * @description TOO
 * @Author cfx
 * @DATE 2019/4/15 14:25
 * @VERSION 1.0
 **/

import com.syni.mdd.yhd.common.all.constants.ResultMsg;
import com.syni.mdd.sjb.common.component.utils.common.utils.ResultMapHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

@RestController
@RequestMapping("/app")
public class BmsOpenController {
    @Autowired
    RedisTemplate redisTemplate;

    @PostMapping("/getDevId")
    public Map<String, Object> getDevId(@RequestBody Map<String, Object> paramsMap) {
        Map<String,Object> resultMap = new HashMap<>();
        String devId = UUID.randomUUID().toString().replaceAll("-", "");
        resultMap.put("devId",devId);
        return ResultMapHelper.success(resultMap, ResultMsg.MSG_GET_SUCCESS);
    }

}
